/*
 * Clock.cpp
 * 
 *  Created on: Jan 01, 2011
 *  Author: Kevin Mueller
 */


#include "Clock.h"

#include <QtCore>

Clock::Clock(QObject *parent) : QTimer(parent){
	setInterval(1000);

	connect(this, SIGNAL(timeout()), this, SLOT(tick()));
	
	start();
}

QString Clock::getTime(QString format){
	return QTime::currentTime().toString(format);
}

void Clock::tick(){
	emit changed(this);
}
